package request

import (
	"gitee.com/cjsn/topsdk/util"
)

type TmallServicecenterWorkcardReserveRequest struct {
	/*
	   工单id     */
	WorkcardId *int64 `json:"workcard_id,omitempty" required:"false" `
	/*
	   服务开始时间     */
	ReserveTimeStart *util.LocalTime `json:"reserve_time_start,omitempty" required:"false" `
	/*
	   服务结束时间     */
	ReserveTimeEnd *util.LocalTime `json:"reserve_time_end,omitempty" required:"false" `
	/*
	   工人手机号     */
	WorkerMobile *string `json:"worker_mobile,omitempty" required:"false" `
	/*
	   预约备注信息     */
	ReserveRemark *string `json:"reserve_remark,omitempty" required:"false" `
	/*
	   工人姓名     */
	WorkerName *string `json:"worker_name,omitempty" required:"false" `
	/*
	   扩展信息     */
	Attributes *string `json:"attributes,omitempty" required:"false" `
	/*
	   存在多个不同预约节点时需要回传。用于区分具体是哪个预约节点，例如预约上门鉴定和预约上门取件     */
	Action *string `json:"action,omitempty" required:"false" `
	/*
	   履约类型，上门或者到店     */
	FulfilType *string `json:"fulfil_type,omitempty" required:"false" `
	/*
	   门店编码     */
	ServiceStoreCode *string `json:"service_store_code,omitempty" required:"false" `
	/*
	   门店名称     */
	ServiceStoreName *string `json:"service_store_name,omitempty" required:"false" `
	/*
	   核销单id     */
	FulfilTaskId *int64 `json:"fulfil_task_id,omitempty" required:"false" `
	/*
	   原因code     */
	ReasonCode *int64 `json:"reason_code,omitempty" required:"false" `
	/*
	   原因desc     */
	ReasonDesc *string `json:"reason_desc,omitempty" required:"false" `
	/*
	   请求来源类型 defalutValue��2    */
	Type *int64 `json:"type,omitempty" required:"false" `
}

func (s *TmallServicecenterWorkcardReserveRequest) SetWorkcardId(v int64) *TmallServicecenterWorkcardReserveRequest {
	s.WorkcardId = &v
	return s
}
func (s *TmallServicecenterWorkcardReserveRequest) SetReserveTimeStart(v util.LocalTime) *TmallServicecenterWorkcardReserveRequest {
	s.ReserveTimeStart = &v
	return s
}
func (s *TmallServicecenterWorkcardReserveRequest) SetReserveTimeEnd(v util.LocalTime) *TmallServicecenterWorkcardReserveRequest {
	s.ReserveTimeEnd = &v
	return s
}
func (s *TmallServicecenterWorkcardReserveRequest) SetWorkerMobile(v string) *TmallServicecenterWorkcardReserveRequest {
	s.WorkerMobile = &v
	return s
}
func (s *TmallServicecenterWorkcardReserveRequest) SetReserveRemark(v string) *TmallServicecenterWorkcardReserveRequest {
	s.ReserveRemark = &v
	return s
}
func (s *TmallServicecenterWorkcardReserveRequest) SetWorkerName(v string) *TmallServicecenterWorkcardReserveRequest {
	s.WorkerName = &v
	return s
}
func (s *TmallServicecenterWorkcardReserveRequest) SetAttributes(v string) *TmallServicecenterWorkcardReserveRequest {
	s.Attributes = &v
	return s
}
func (s *TmallServicecenterWorkcardReserveRequest) SetAction(v string) *TmallServicecenterWorkcardReserveRequest {
	s.Action = &v
	return s
}
func (s *TmallServicecenterWorkcardReserveRequest) SetFulfilType(v string) *TmallServicecenterWorkcardReserveRequest {
	s.FulfilType = &v
	return s
}
func (s *TmallServicecenterWorkcardReserveRequest) SetServiceStoreCode(v string) *TmallServicecenterWorkcardReserveRequest {
	s.ServiceStoreCode = &v
	return s
}
func (s *TmallServicecenterWorkcardReserveRequest) SetServiceStoreName(v string) *TmallServicecenterWorkcardReserveRequest {
	s.ServiceStoreName = &v
	return s
}
func (s *TmallServicecenterWorkcardReserveRequest) SetFulfilTaskId(v int64) *TmallServicecenterWorkcardReserveRequest {
	s.FulfilTaskId = &v
	return s
}
func (s *TmallServicecenterWorkcardReserveRequest) SetReasonCode(v int64) *TmallServicecenterWorkcardReserveRequest {
	s.ReasonCode = &v
	return s
}
func (s *TmallServicecenterWorkcardReserveRequest) SetReasonDesc(v string) *TmallServicecenterWorkcardReserveRequest {
	s.ReasonDesc = &v
	return s
}
func (s *TmallServicecenterWorkcardReserveRequest) SetType(v int64) *TmallServicecenterWorkcardReserveRequest {
	s.Type = &v
	return s
}

func (req *TmallServicecenterWorkcardReserveRequest) ToMap() map[string]interface{} {
	paramMap := make(map[string]interface{})
	if req.WorkcardId != nil {
		paramMap["workcard_id"] = *req.WorkcardId
	}
	if req.ReserveTimeStart != nil {
		paramMap["reserve_time_start"] = *req.ReserveTimeStart
	}
	if req.ReserveTimeEnd != nil {
		paramMap["reserve_time_end"] = *req.ReserveTimeEnd
	}
	if req.WorkerMobile != nil {
		paramMap["worker_mobile"] = *req.WorkerMobile
	}
	if req.ReserveRemark != nil {
		paramMap["reserve_remark"] = *req.ReserveRemark
	}
	if req.WorkerName != nil {
		paramMap["worker_name"] = *req.WorkerName
	}
	if req.Attributes != nil {
		paramMap["attributes"] = *req.Attributes
	}
	if req.Action != nil {
		paramMap["action"] = *req.Action
	}
	if req.FulfilType != nil {
		paramMap["fulfil_type"] = *req.FulfilType
	}
	if req.ServiceStoreCode != nil {
		paramMap["service_store_code"] = *req.ServiceStoreCode
	}
	if req.ServiceStoreName != nil {
		paramMap["service_store_name"] = *req.ServiceStoreName
	}
	if req.FulfilTaskId != nil {
		paramMap["fulfil_task_id"] = *req.FulfilTaskId
	}
	if req.ReasonCode != nil {
		paramMap["reason_code"] = *req.ReasonCode
	}
	if req.ReasonDesc != nil {
		paramMap["reason_desc"] = *req.ReasonDesc
	}
	if req.Type != nil {
		paramMap["type"] = *req.Type
	}
	return paramMap
}

func (req *TmallServicecenterWorkcardReserveRequest) ToFileMap() map[string]interface{} {
	fileMap := make(map[string]interface{})
	return fileMap
}
